-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Notifier] Update information for slack on actual implementation #14647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I completely missed this revert. This doc was extremely difficult to follow due to the new Slack integration I believe, so I hope this revert will help here.
cc @Nyholm @OskarStark fyi, as I know you struggled to get the 5.1 integration working.
@wouterj In general, what do you think about a new page under Learn more like "How to configure slack and send messages" including a little explanation how to get the token and the correct authorization in the Slack API? Or would that going too far for the symfony documentation? For example it was a little bit difficult to find the correct documentation of the current Slack implementation which is symfony using. |
I would love to have sth like this and as it is about Slack which is a big player I think we can and should provide it to make the experience as smooth as possible 👍 WDYT @Nyholm @javiereguiluz |
SLACK_DSN=slack://default/ID | ||
# If your slack webhook looks like "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX" then use: | ||
SLACK_DSN=slack://default/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX | ||
SLACK_DSN=slack://TOKEN@default?channel=CHANNEL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this true? 🤔
I currently use Symfony 5.2 and the following DSN:
SLACK_DSN=slack://token_to_be_changed@default/T......../B......./q...........
I mean is the channel required? IMO a webhook can only be configured for a dedicated channel which is "included" in the: /XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes with 5.2 :)
The slack implementation is now using the Slack API again, see https://api.slack.com/methods/chat.postMessage. Because of that you have to set the target channel and the token of your Slack app.
I used the token under "OAuth & Permissions" in the Slack app configuration interface and add the scope "chat:write". At the end i also had to add the bot by hand to the target channel in Slack.
I'm usually against having lots of small pages ... for our maintenance is not great, but for users is also bad in many situations (they end jumping from one small page to another, opening 10 browser tabs ... instead of having a single page with all the info). In these past years we've moved from "small pages" to "big reference pages". See for example the Routing page, it's large, but it covers 90% of the routing features, leaving the very specific and advanced features for other separate pages. If possible, I'd like to do the same here. If the resulting page is impossibly long, this might be a caution warning about the component itself, which is too verbose or complex to setup. |
Makes sense, but you are not against a section (not an extra page) with the content, right? |
Let's merge this PR as-is 👍 The current Notifier doc structure was build on 5.0. The component changed a lot since then and we've only "patched" the docs. I think it no longer fits the current docs ( e.g. Slack and another chatter also have their own page, etc.). Let's discuss how to better structure this part of the documentation in a new issue. |
Thank you Malte. |
The documentation wasn't updated after doing BC in the notifier component in slack.
See https://github.com/symfony/symfony/blob/5.2/src/Symfony/Component/Notifier/Bridge/Slack/CHANGELOG.md